home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 168
/
168.d81
/
spot finder
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
4KB
|
180 lines
5 poke55,.:poke56,56:clr
6 dv=peek(186):ifdv<8thendv=8
7 print"[147]":poke53280,.:poke53281,.
9 poke53272,31
10 poke53371,.
12 ad=49152
14 sysad:sysad+12
40 rem jupiter's central meridian
45 bs$="[129][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164]"
50 dt=57
55 p2=2*(NULL):rd=180/(NULL):dr=1/rd
60 gosub295:rem get date and ut
65 d=(j-2451545)+f
70 d=d+dt/86400:rem ut to et
75 gosub395
80 reada1,a2,d1,d2
85 t=t-1:rem cent from 2000.0
90 a1=a1+a2*t
95 d1=d1+d2*t
100 q=a1:gosub690:a1=q*dr
105 q=d1:gosub690:d1=q*dr
110 d9=cos(d5)*sin(a1-a5)
115 n9=sin(d1)*cos(d5)*cos(a1-a5)
120 n9=n9-cos(d1)*sin(d5)
125 k=rd*atn(n9/d9)
130 ifd9<0thenk=k+180
135 :
140 readw0,w1,w2:rem system i
145 gosub220
150 sysad+9,15
151 poke214,10:print:printtab(1)"[156][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162]"
153 print:printtab(4)"[153][195]entral-[205]eridian ([201]):";c;"[219]"
155 printtab(4)"[150][198]or [208]lanet [202]upiter (long)"
160 readw0,w1,w2:rem system ii
165 gosub220
170 print:printtab(4)"[153][195]entral-[205]eridian ([201][201]):";c;"[219]"
172 printtab(4)"[150][198]or [199]reat [210]ed [211]pot (long)"
175 print:printtab(3)"[153][204]ocation-"
176 ifc>=25andc<35thengosub750
177 ifc>1andc<25thengosub755
178 ifc>35andc<90thengosub760
179 ifc>90andc<360thengosub765
180 gosub4000
190 restore:goto40
220 rem rotations from epoch
225 w=w0+w1*(d-.0057755*rr)+w2*t
230 q=w-k:gosub690:c=q
235 c=int(100*c+.5)/100
240 return
245 rem north pole r.a.
250 data268.05,+0.107
255 rem north pole declin
260 data64.49,-0.015
265 rem system i
270 data67.10,877.9000,1.291
275 rem system ii
280 data43.30,870.2700,1,291
285 :
290 rem calendar ---> jd
295 print"[147]":sysad+9,7
296 print"[129][220][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][221]"
297 printbs$""tab(38)bs$
298 print"[129][255][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][161]"
300 print""tab(5)"[154]-[150][198][201][206][196] [212][200][197] [199][210][197][193][212] [210][197][196] [211][208][207][212][154]-"
302 printtab(6)"[158][197]nter [217]ear: ";:l9%=4:gosub705:y=q9
305 printtab(6)"[158][197]nter [205]onth: ";:l9%=2:gosub705:m=q9
307 ifm=<0orm>12thenprint"[145][145]":goto305
310 printtab(6)"[158][197]nter [196]ay: ";:l9%=2:gosub705:d=q9
312 ifd=<0ord>31thenprint"[145][145]":goto310
315 printtab(6)"[158][197]nter [213][212] [200]our: ";:l9=2:gosub705:h1=q9
317 ifh1<0orh1>24thenprint"[145][145]":goto315
320 printtab(6)"[158][197]nter [205]inutes: ";:l9=2:gosub705:m1=q9
322 ifm1<0orm1>60thenprint"[145][145]":goto320
324 printtab(6)"[158][197]nter [211]econds: ";:l9=2:gosub705:s1=q9
325 ifs1<0ors1>60thenprint"[145][145]":goto324
327 poke214,10:print:printtab(4)"[159][201]s the information correct? [155][217]/[206]":poke198,.
328 gethc$:ifhc$<>"y"andhc$<>"n"then328
329 ifhc$="n"then290
330 d=d+h1/24+m1/1440+s1/86400
332 sysad+9,9
335 g=1:ify<1582then g=0
340 d1=int(d):f=d-d1-.5
345 j=-int(7*(int((m+9)/12)+y)/4)
350 ifg=0then370
355 s=sgn(m-9):a=abs(m-9)
360 j3=int(y+s*int(a/7))
365 j3=-int((int(j3/100)+1)*3/4)
370 j=j+int(275*m/9)+d1+g*j3
375 j=j+1721027+2*g+367*y
380 iff>0then390
385 f=f+1:j=j-1
390 return
395 rem fundamental arguments
400 :
405 t=d/36525+1
410 rem t=centuries from 1900.0
415 l0=.779072+.00273790931*d
420 g0=.993126+.0027377785*d
425 l5=.089608+.00023080893*d
430 g5=.056531+.00023080893*d
435 g6=.882987+.00009294371*d
440 l0=(l0-int(l0))*p2
445 g0=(g0-int(g0))*p2
450 l5=(l5-int(l5))*p2
455 g5=(g5-int(g5))*p2
460 g6=(g6-int(g6))*p2
465 l=6910*sin(g0)
470 l=l+72*sin(2*g0)
475 l=l-17*t*sin(g0)
480 l=l-7*cos(g0-g5)
485 r=1.00014-.01675*cos(g0)
490 r=r-.00014*cos(2*g0)
495 l=l0+l/206265
500 rem juipter
505 j=19934*sin(g5)
510 j=j+5023*t+2511
515 j=j+1093*cos(2*g5-5*g6)
520 j=j+601*sin(2*g5)
525 j=j-479*sin(2*g5-5*g6)
530 j=j-185*sin(2*g5-2*g6)
535 j=j+137*sin(3*g5-5*g6)
540 j=j-131*sin(g5-2*g6)
545 b=-4692*cos(g5)
550 b=b+227-227*cos(2*g5)
555 b=b+30*t*sin(g5)
560 r5=5.20883-.25122*cos(g5)
565 r5=r5-.00604*cos(2*g5)
570 r5=r5+.0026*cos(2*g5-2*g6)
575 r5=r5-.0017*cos(3*g5-5*g6)
580 r5=r5-.00106*sin(2*g5-2*g6)
585 r5=r5-.00091*t*sin(g5)
590 r5=r5-.00084*t*cos(g5)
595 l5=l5+j/206265:b5=b/206265
600 n9=r5*cos(b5)*sin(l5-l)
605 d9=r5*cos(b5)*cos(l5-l)+r
610 l1=atn(n9/d9)
615 ifd9<0thenl1=l1+(NULL)
620 ll=l1+l
625 v=n9*n9+d9*d9
630 rr=sqr(v+(r5*sin(b5))^2)
635 s=r5*sin(b5)/rr
640 bb=atn(s/sqr(1-s*s))
645 e=(88428-47*t)/206265
650 n9=sin(ll)*cos(e)-tan(bb)*sin(e)
655 d9=cos(ll):a5=atn(n9/d9)
660 ifd9<0thena5=a5+(NULL)
665 s=sin(bb)*cos(e)
670 s=s+cos(bb)*sin(e)*sin(ll)
675 d5=atn(s/sqr(1-s*s))
680 return
685 :
690 rem normalize degrees
695 q=q/360:q=q-int(q):q=q*360
700 return
705 q9$="":poke198,.
707 geta$
709 poke646,rnd(1)*15+1:print"*[157]";:ifa$=""then707
711 ifa$=chr$(13)thenprint" ":q9=val(q9$):return
713 if(a$=chr$(20)andlen(q9$))thenq9$=left$(q9$,len(q9$)-1):goto725
715 iflen(q9$)>=l9%thensysad+9,6:goto707
717 if(a$>="0"anda$<="9")ora$="."ora$="-"then721
719 goto707
721 q9$=q9$+a$
723 print""a$;:sysad+9,6:goto707
725 print" [157][157] [157]";:goto707
750 print:printtab(13)"[145][145][[159][211]pot is [195]enter [211]tage!]":return
755 print:printtab(13)"[145][145][[159][206]ot [209]uite there [217]et!]":return
760 print:printtab(13)"[145][145][[159][202]ust missed it [196]arn!]":return
765 print:printtab(13)"[145][145][[159][195]lean out of sight!]":return
4000 poke214,20:print:printtab(8)"[159](1[159])[154] [212]ry another one
4005 [153][163]8)"open(2open)cont (NULL)o (NULL)(NULL)right$(NULL)val(NULL)(NULL)val (NULL)enu
4010 sysad+9,9:poke198,0
4015 geta$:ifa$<"1"ora$>"2"then4015
4020 ifa$="1"thenreturn
4025 sysad+15
4030 print"[147][144]load"chr$(34)"b.universe ii"chr$(34)","dv
4035 print"run28"
4040 poke631,13:poke632,13:poke198,2:end
10000 d=peek(186):n$="spot finder":open15,d,15,"s0:"+n$:close15:saven$,d:end